﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using haptic.src.engine.debug;

namespace haptic.src.engine.collisions
{
    public class CollisionHit
    {
        public Vector2 m_vNormal = Vector2.Zero;
        public Vector2 m_vSourceContact = Vector2.Zero;
        public Vector2 m_vTargetContact = Vector2.Zero;
    }
    public class BoundingBox
    {
        public BoundingBox(){}
        public BoundingBox(Vector2 vCenter, Vector2 vHalfSize)
        {
            m_vCenter = vCenter;
            m_vHalfSize = vHalfSize;
        }
        public Vector2 m_vCenter = Vector2.Zero;
        public Vector2 m_vHalfSize = Vector2.Zero;
    }
    public interface ICollider
    {
        bool IsInside(Vector2 vPos);
        bool IsInside(ICollider oCollider);
        bool IsColliding(ICollider oCollider);
        bool IsColliding(ICollider oCollider, CollisionHit oCollisionHit);
        BoundingBox GetBoundingBox();
        void DrawDebug(DebugRenderer oDebug);
        void SetCenter(Vector2 vCenter);
        ICollider Clone();
    }
}
